package com.itany.boot.service;

import com.github.pagehelper.PageInfo;
import com.itany.boot.entity.User;
import com.itany.boot.exception.AdminUserException;
import com.itany.boot.exception.CodeErrorException;
import com.itany.boot.exception.MD5ErrorException;
import com.itany.boot.exception.RequestParameterErrorException;

/**
 * @author 黄衡熙
 * @version 1.0
 */
public interface AdminUserService {
    /**
     * 管理员登录
     * @param loginName
     * @param password
     * @param code
     * @param image
     * @return
     */
    User login(String loginName, String password, String code, String image) throws RequestParameterErrorException, CodeErrorException, MD5ErrorException, AdminUserException;

    /**
     * 分页查询
     * @param userParam
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageInfo<User> findByParams(User userParam, String pageNo, String pageSize);

    /**
     * 修改设置默认值
     * @param id
     * @return
     * @throws RequestParameterErrorException
     */
    User findById(String id) throws RequestParameterErrorException;

    /**
     * 修改用户信息
     * @param id
     * @param nickname
     * @param role
     * @param password
     * @param email
     * @throws RequestParameterErrorException
     */
    void modifyUser(String id,String nickname,String role,String password,String email) throws RequestParameterErrorException;

    /**
     * 启用与禁用
     * @param id
     * @param status
     * @throws RequestParameterErrorException
     */
    void modifyStatus(String id,String status) throws RequestParameterErrorException;


}
